package com.smalluz.ad.modules.ks.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

public interface ErrorCodeEnum {
    Integer getCode();

    String getMsg();

    @AllArgsConstructor
    @Getter
    enum CommonEnum implements ErrorCodeEnum {
        OK(0, "成功"),
        TOO_MANY_REQUESTS(400001,  "请求过于频繁"),
        ACCESS_TOKEN_EXPRIED(402000,  "access token 过期"),
        ACCESS_TOKEN_ERROR(402004,  "access token 错误"),
        ACCESS_TOKEN_EMPTY(402003,  "access token 为空");

        private final Integer code;

        private final String msg;
    }

}
